
<div class="pageContent">
	<form method="post" action="<?echo __WWWROOT__?>Admin/Menu/add.php" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
		<div class="pageFormContent" layoutH="56">
			<dl class="nowrap">
				<dt>名称：</dt>
				<dd><input name="name" class="required" type="text" size="30" value="" alt=""/></dd>
			</dl>
			<dl class="nowrap">
				<dt>路径：</dt>
				<dd><input name="url" class="" type="text" size="30" value="" alt=""/></dd>
			</dl>
			<dl class="nowrap">
				<dt>描述：</dt>
				<dd><textarea name="info"  rows="5" cols="40"></textarea></dd>
			</dl>
			<dl class="nowrap">
				<dt>父节点：</dt>
				<dd>
					<input type="hidden" name="parent" value=""/>
					<input type="text" class="textInput required" name="orgName" value="" readonly="readonly"/>
					<a class="btnLook" href="<?echo __WWWROOT__?>Admin/Menu/lookup.php" lookupGroup="" lookupName="orgLookup" maxable="false" resizable="false" title="查找父菜单"><hi:text key="查找带回"/></a>
				</dd>
			</dl>
			<dl class="nowrap">
				<dt>级别：</dt>
				<dd>
					<select name="level" class="required">
						<?foreach($levels as $key=>$l){?>
						<option value="<?echo $key?>"><?echo $l?></option>}
						<?}?>

					</select>
				</dd>
			</dl>
			<dl class="nowrap">
				<dt>弹出方式：</dt>
				<dd>
					<select name="target" class="required" onchange="targetChange(this.value);">
						<?foreach($targets as $key=>$t){?>
						<option value="<?echo $key?>"><?echo $t?></option>}
						<?}?>
					</select>
				</dd>
			</dl>
			<dl class="nowrap" id="width_box" style="display:none">
				<dt>宽度：</dt>
				<dd><input id="width" name="width" class="" type="text" size="3" value="" alt=""/></dd>
			</dl>
			<dl class="nowrap" id="height_box" style="display:none">
				<dt>高度：</dt>
				<dd><input id="height" name="height" class="" type="text" size="3" value="" alt=""/></dd>
			</dl>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">添加</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>

<script type="text/javascript">
	function targetChange(value){
		if(value == "dialog"){
			$("#width_box").css("display", "block");
			$("#height_box").css("display", "block");
			$("#width").focus();
		}else{
			$("#width_box").css("display", "none");
			$("#height_box").css("display", "none");
		}
	}
</script>

